diff -Nur quake2-3.21/ctf/g_local.h quake2-3.21.next/ctf/g_local.h
--- quake2-3.21/ctf/g_local.h	2001-12-22 16:32:20.000000000 +0300
+++ quake2-3.21.next/ctf/g_local.h	2025-05-12 23:18:26.005781526 +0300
@@ -465,11 +465,11 @@
 
 extern	int	sm_meat_index;
 extern	int	snd_fry;
-
+#if 0
 extern	int	jacket_armor_index;
 extern	int	combat_armor_index;
 extern	int	body_armor_index;
-
+#endif
 
 // means of death
 #define MOD_UNKNOWN			0
@@ -562,7 +562,7 @@
 extern	cvar_t	*sv_maplist;
 
 //ZOID
-extern	qboolean	is_quad;
+//extern	qboolean	is_quad;
 //ZOID
 
 #define world	(&g_edicts[0])
diff -Nur quake2-3.21/game/g_local.h quake2-3.21.next/game/g_local.h
--- quake2-3.21/game/g_local.h	2001-12-22 16:32:24.000000000 +0300
+++ quake2-3.21.next/game/g_local.h	2025-05-12 23:18:26.005781526 +0300
@@ -457,11 +457,11 @@
 
 extern	int	sm_meat_index;
 extern	int	snd_fry;
-
+#if 0
 extern	int	jacket_armor_index;
 extern	int	combat_armor_index;
 extern	int	body_armor_index;
-
+#endif
 
 // means of death
 #define MOD_UNKNOWN			0
diff -Nur quake2-3.21/linux/d_copy.s quake2-3.21.next/linux/d_copy.s
--- quake2-3.21/linux/d_copy.s	2001-10-02 14:11:08.000000000 +0400
+++ quake2-3.21.next/linux/d_copy.s	2025-05-12 23:18:26.009781504 +0300
@@ -5,6 +5,8 @@
 
 #include "qasm.h"
 
+#if	id386
+
 	.data
 
 LCopyWidth:		.long	0
@@ -145,3 +147,4 @@
 
 	ret
 
+#endif	// id386
diff -Nur quake2-3.21/linux/Makefile quake2-3.21.next/linux/Makefile
--- quake2-3.21/linux/Makefile	2001-12-22 18:45:58.000000000 +0300
+++ quake2-3.21.next/linux/Makefile	2025-05-12 23:21:22.724816591 +0300
@@ -19,6 +19,9 @@
 ifneq (,$(findstring alpha,$(shell uname -m)))
 ARCH=axp
 RPMARCH=alpha
+else ifneq (,$(findstring aarch,$(shell uname -m)))
+ARCH=armhf
+RPMARCH=arm
 else
 ARCH=i386
 RPMARCH=i386
@@ -48,18 +51,23 @@
 EGCS=/usr/local/egcs-1.1.2/bin/gcc
 
 CC=gcc
-BASE_CFLAGS=-Dstricmp=strcasecmp
+BASE_CFLAGS=-Dstricmp=strcasecmp -fsigned-char -fcommon -Wno-traditional -D_DEFAULT_SOURCE -std=gnu99
+ADD_FLAGS=
 
 ifeq ($(ARCH),axp)
 RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -ffast-math -funroll-loops \
 	-fomit-frame-pointer -fexpensive-optimizations
-else
-RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mpentiumpro -O6 -ffast-math -funroll-loops \
+else ifneq (,$(findstring aarch,$(shell uname -m)))
+RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -ffast-math -funroll-loops -march=armv7+vfpv3-d16 \
 	-fomit-frame-pointer -fexpensive-optimizations
+else
+RELEASE_CFLAGS=$(BASE_CFLAGS) -g -march=pentiumpro -O6 -ffast-math -funroll-loops \
+	-fomit-frame-pointer -fexpensive-optimizations -m32
+ADD_FLAGS=-m32
 endif
 
-DEBUG_CFLAGS=$(BASE_CFLAGS) -g
-LDFLAGS=-ldl -lm
+DEBUG_CFLAGS=$(BASE_CFLAGS) $(ADD_FLAGS) -g
+LDFLAGS=-ldl -lm $(ADD_FLAGS)
 SVGALDFLAGS=-lvga -lm
 XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga
 XCFLAGS=
@@ -99,11 +107,11 @@
 else
 TARGETS=$(BUILDDIR)/quake2 \
 	$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
-	$(BUILDDIR)/ref_soft.$(SHLIBEXT) \
 	$(BUILDDIR)/ref_softx.$(SHLIBEXT) \
-	$(BUILDDIR)/ref_gl.$(SHLIBEXT) \
-	$(BUILDDIR)/ref_glx.$(SHLIBEXT) \
 	$(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
+#	$(BUILDDIR)/ref_soft.$(SHLIBEXT) \
+#	$(BUILDDIR)/ref_gl.$(SHLIBEXT) \
+#	$(BUILDDIR)/ref_glx.$(SHLIBEXT) \
 #	$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) \
 #	$(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT)
 endif
@@ -1306,7 +1314,7 @@
 	$(DO_SHLIB_CC)
 
 $(BUILDDIR)/ref_soft/r_bsp.o :        $(REF_SOFT_DIR)/r_bsp.c
-	$(DO_SHLIB_CC)
+	$(DO_SHLIB_DEBUG_CC)
 
 $(BUILDDIR)/ref_soft/r_draw.o :       $(REF_SOFT_DIR)/r_draw.c
 	$(DO_SHLIB_CC)
diff -Nur quake2-3.21/linux/sys_dosa.s quake2-3.21.next/linux/sys_dosa.s
--- quake2-3.21/linux/sys_dosa.s	2001-10-02 14:11:12.000000000 +0400
+++ quake2-3.21.next/linux/sys_dosa.s	2025-05-12 23:18:26.013781481 +0300
@@ -4,6 +4,7 @@
 
 #include "qasm.h"
 
+#if	id386
 
 	.data
 
@@ -92,3 +93,4 @@
 
 	ret
 
+#endif	// id386
diff -Nur quake2-3.21/linux/sys_linux.c quake2-3.21.next/linux/sys_linux.c
--- quake2-3.21/linux/sys_linux.c	2001-12-22 18:45:58.000000000 +0300
+++ quake2-3.21.next/linux/sys_linux.c	2025-05-12 23:18:26.017781458 +0300
@@ -223,6 +223,8 @@
 	const char *gamename = "gamei386.so";
 #elif defined __alpha__
 	const char *gamename = "gameaxp.so";
+#elif defined __arm__
+	const char *gamename = "gamearmhf.so";
 #else
 #error Unknown arch
 #endif
